#include <iostream>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std;

string convert(string s, int numRows)
{
    if(s.size() == 0)
        return "";
    vector<string>line(numRows);
    bool step = false;
    int num = 0;

    for(char c : s)
    {
        line[num] += c;
        if(num == 0 || num == numRows - 1)  step = !step;
        if(numRows!=1)num += step?1:-1;
    }

    string result;
    for(string row : line) result += row;
    return  result;
}


int main() {
    cout<<convert("",1)<<endl;

    //lciretoesiigedhn
    return 0;
}